package chapter04.demo4;

public class Demo4 {
    class Animal{
        void shout(){
            System.out.println("动物发出叫声");
        }
    }
    class Dog extends Animal{
        void shout(){
            System.out.println("喵喵喵......");
        }
    }
    public class Example04{
        public void main(String[] args){
            Dog dog = new Dog();
            dog.shout();
        }
    }
}
